package com.evil.application.pojo.dto.order;

import com.evil.application.enums.ResettingTypeEnum;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 编号自增配置
 *
 * @author liyang
 * @date 2022-08-08 00:00
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class OrderSnSettingDTO extends SnSettingBaseDTO {

    /**
     * 应用id
     */
    private Long applicationId;

    /**
     * 重置类型
     */
    @NotNull(message = "重置类型参数不能为空")
    private Integer resettingType;

    public OrderSnSettingDTO() {
        super();
        this.resettingType = ResettingTypeEnum.UN_RESETTING.getId();
    }

    public OrderSnSettingDTO(@NotNull(message = "企业id参数不能为空") Long enterpriseId, @NotBlank(message = "编号自增类型不能为空") String type) {
        super(enterpriseId, type);
        this.resettingType = ResettingTypeEnum.UN_RESETTING.getId();
    }
}
